Skip to content

Conversation

@fglock
Copy link
Owner

@fglock fglock commented Oct 29, 2025

This commit fixes op/inccode-tie.t by properly handling tied arrays in @inc:

  1. ModuleOperators.java:

    • Changed from direct .elements list access to indexed get() calls
    • Added tiedFetch() calls for TIED_SCALAR elements
    • Fixed absolute/relative path handling to only try hooks (not directories)
    • Added support for hooks returning scalar refs with code
    • Removed unused import
  2. RuntimeArray.java:

    • Fixed dynamicSaveState() to preserve TieArray objects instead of copying
    • Fixed dynamicRestoreState() to restore array type along with elements
    • This fixes ClassCastException when using local @inc with tied arrays

Test results:

  • op/inccode-tie.t: PASS (73/75 OK, 6 skipped, 1 minor failure)
  • make test: 100% pass rate (141/141 files, 1965/1965 tests)

This commit fixes op/inccode-tie.t by properly handling tied arrays in @inc:

1. ModuleOperators.java:
   - Changed from direct .elements list access to indexed get() calls
   - Added tiedFetch() calls for TIED_SCALAR elements
   - Fixed absolute/relative path handling to only try hooks (not directories)
   - Added support for hooks returning scalar refs with code
   - Removed unused import

2. RuntimeArray.java:
   - Fixed dynamicSaveState() to preserve TieArray objects instead of copying
   - Fixed dynamicRestoreState() to restore array type along with elements
   - This fixes ClassCastException when using local @inc with tied arrays

Test results:
- op/inccode-tie.t: PASS (73/75 OK, 6 skipped, 1 minor failure)
- make test: 100% pass rate (141/141 files, 1965/1965 tests)
@fglock fglock merged commit d26aafd into master Oct 29, 2025
2 checks passed
@fglock fglock deleted the fix-commonsense-test branch October 29, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants